package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.InstitutionTypeExample.E_INSTITUTION_TYPE_INTRODUCE;
import static org.jsola.hr.example.InstitutionTypeExample.E_INSTITUTION_TYPE_NAME;
import static org.jsola.hr.example.InstitutionTypeExample.E_LEVEL;
import static org.jsola.hr.example.InstitutionTypeExample.E_PARENT_ID;
import static org.jsola.hr.example.InstitutionTypeExample.E_SORT;
import static org.jsola.hr.example.InstitutionTypeExample.M_INSTITUTION_TYPE_INTRODUCE_MAX;
import static org.jsola.hr.example.InstitutionTypeExample.M_INSTITUTION_TYPE_NAME_MAX;
import static org.jsola.hr.example.InstitutionTypeExample.M_LEVEL_NOT_NULL;
import static org.jsola.hr.example.InstitutionTypeExample.M_PARENT_ID_MAX;
import static org.jsola.hr.example.InstitutionTypeExample.M_PARENT_ID_NOT_NULL;
import static org.jsola.hr.example.InstitutionTypeExample.M_SORT_NOT_NULL;
import static org.jsola.hr.example.InstitutionTypeExample.N_INSTITUTION_TYPE_INTRODUCE;
import static org.jsola.hr.example.InstitutionTypeExample.N_INSTITUTION_TYPE_NAME;
import static org.jsola.hr.example.InstitutionTypeExample.N_LEVEL;
import static org.jsola.hr.example.InstitutionTypeExample.N_PARENT_ID;
import static org.jsola.hr.example.InstitutionTypeExample.N_SORT;

/**
 * 制度分类
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【制度分类】的参数")
@Data
public class InstitutionTypeAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_INSTITUTION_TYPE_NAME, example = E_INSTITUTION_TYPE_NAME)
    @Length(max = 32, message = M_INSTITUTION_TYPE_NAME_MAX)
    private String institutionTypeName;

    @ApiModelProperty(notes = N_INSTITUTION_TYPE_INTRODUCE, example = E_INSTITUTION_TYPE_INTRODUCE)
    @Length(max = 64, message = M_INSTITUTION_TYPE_INTRODUCE_MAX)
    private String institutionTypeIntroduce;

    @ApiModelProperty(notes = N_PARENT_ID, example = E_PARENT_ID, required = true)
    @NotNull(message = M_PARENT_ID_NOT_NULL)
    @Length(max = 32, message = M_PARENT_ID_MAX)
    private String parentId;

    @ApiModelProperty(notes = N_SORT, example = E_SORT, required = true)
    @NotNull(message = M_SORT_NOT_NULL)
    private Long sort;

    @ApiModelProperty(notes = N_LEVEL, example = E_LEVEL, required = true)
    @NotNull(message = M_LEVEL_NOT_NULL)
    private Integer level;


}

